If the Hamming weight of a linear code is at least 2t + 1, then the code can correct any t or fewer errors. Alternatively, the code can detect any 2t or fewer errors.